package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.dragon.mmochat.model.enumType.MmochatPropType;
import com.dragon.mmochat.model.role.MmochatPlayer;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiProtocolMessage;

public class Mmochat_1_23S extends SkymobiProtocolMessage {
	MmochatPlayer me;

	public Mmochat_1_23S() {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_S_1_23);
	}

	@Override
	protected void encodeBody(SkymobiBuffer out) {
		if (me.hasPropEffect(MmochatPropType.驱魔符.getEffectKey())
				|| me.hasPropEffect(MmochatPropType.龙涎香.getEffectKey())) {
			out.put((byte) 1);
		} else {
			out.put((byte) 0);
		}
	}

	public void setMe(MmochatPlayer me) {
		this.me = me;
	}
}
